package lee.study.service;

import org.springframework.scheduling.annotation.Async;
import org.springframework.stereotype.Service;

/**
 * Created by chenglong on 2017/11/5.
 */
@Service
public class TestService {

    @Async("myExecutor")
    public void execAsyncMethod(String[] arrays) throws InterruptedException {
        System.out.println("我是被异步调用的方法！");
        Thread.sleep(5000);
        int i = 1 / 0;
        System.out.println("我执行结束了！");
    }

    public void testDynamticDataSource(){

    }

}
